<html>
<head>
<title>eLGU - {TITLE}</title>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="css/elgu.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>

<script language="Javascript">
function setDays(dateObj) {
  var obj=eval("document.CertificateOfLandHolding."+dateObj+"_day");
  daySelected = obj.selectedIndex;
  objlen=obj.length;
  nullfield = 1;

  for (i=objlen-1; i>=28+nullfield; i--){
	obj.options.remove(i);
  }
  switch(eval("document.CertificateOfLandHolding."+dateObj+"_month.value")) {
	case "2":
		objYear = eval("document.CertificateOfLandHolding."+dateObj+"_year.value");
		if ((objYear % 4) == 0) obj.options[28+1]=new Option("29");
		if (daySelected > 27+nullfield){
  			daySelected = 27+nullfield;
		}
	  	break;
	case "4":
	case "6":
	case "9":
	case "11":
		obj.options[28+nullfield]=new Option("29");
		obj.options[29+nullfield]=new Option("30");
		if (daySelected > 29+nullfield){
  			daySelected = 29+nullfield;	
		}
		break;	  
	default:
		obj.options[28+nullfield]=new Option("29");
		obj.options[29+nullfield]=new Option("30");
		obj.options[30+nullfield]=new Option("31");
		 break;
  }
  obj.options[daySelected].selected = true;
}

function urlEncode(str){
	// The Javascript escape and unescape functions do not correspond
	// with what browsers actually do...
	var SAFECHARS = "0123456789" +					// Numeric
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	// Alphabetic
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()";					// RFC2396 Mark characters
	var HEX = "0123456789ABCDEF";

	var plaintext = str;
	var encoded = "";
	for (var i = 0; i < plaintext.length; i++ ) {
		var ch = plaintext.charAt(i);
	    if (ch == " ") {
		    encoded += "+";				// x-www-urlencoded, rather than %20
		} else if (SAFECHARS.indexOf(ch) != -1) {
		    encoded += ch;
		} else {
		    var charCode = ch.charCodeAt(0);
			if (charCode > 255) {
			    alert( "Unicode Character '" 
                        + ch 
                        + "' cannot be encoded using standard URL encoding.\n" +
				          "(URL encoding only supports 8-bit characters.)\n" +
						  "A space (+) will be substituted." );
				encoded += "+";
			} else {
				encoded += "%";
				encoded += HEX.charAt((charCode >> 4) & 0xF);
				encoded += HEX.charAt(charCode & 0xF);
			}
		}
	} // for

	return encoded;
};

function openWin(strLink, strWindow, intLeft, intTop, intWidth, intHeight){
	window.open(strLink, strWindow, "position:absolute; left="+intLeft+", top="+intTop+", width="+intWidth+", height="+intHeight+", status=1, toolbar=0, menubar=1, scrollbars=1, resizable=1");
}

function showPrintWindow(){
	rN = document.CertificateOfLandHolding.requestorName.value;
	rL = document.CertificateOfLandHolding.requestorLocation.value;
	s = document.CertificateOfLandHolding.signatoryID.options[document.CertificateOfLandHolding.signatoryID.selectedIndex].value;
	d = document.CertificateOfLandHolding.designation.value;
	orN = document.CertificateOfLandHolding.orNumber.value;
	orDy = document.CertificateOfLandHolding.orDate_year.options[document.CertificateOfLandHolding.orDate_year.selectedIndex].value;
	orDm = document.CertificateOfLandHolding.orDate_month.options[document.CertificateOfLandHolding.orDate_month.selectedIndex].value;
	orDd = document.CertificateOfLandHolding.orDate_day.options[document.CertificateOfLandHolding.orDate_day.selectedIndex].value;

	if(rN==""){
		alert("Requested By is blank.");
		document.CertificateOfLandHolding.requestorName.focus();
		return false;
	}
	if(rL==""){
		alert("Location is blank.");
		document.CertificateOfLandHolding.requestorLocation.focus();
		return false;
	}
	if(s==""){
		alert("Signatory is blank.");
		document.CertificateOfLandHolding.signatoryID.focus();
		return false;
	}

	nameListUrl = "";
	for(i=0 ; i < document.CertificateOfLandHolding.elements.length ; i++){
		if(document.CertificateOfLandHolding.elements[i].name=="nameList[]"){
			if(document.CertificateOfLandHolding.elements[i].value!=""){
				nameListUrl += "&nameList[]=" + urlEncode(document.CertificateOfLandHolding.elements[i].value);
			}
		}
	}

	if(nameListUrl==""){
		alert("No Individuals/Organizations/Companies to print.");
		return false;
	}

	url = "CertificateOfLandHoldingNoPropertiesPrint.php{Session}&formAction=view";
	url += "&formArray[requestorName]=" + urlEncode(rN);
	url += "&formArray[requestorLocation]=" + urlEncode(rL);
	url += "&formArray[signatoryID]=" + urlEncode(s);
	url += "&formArray[designation]=" + urlEncode(d);
	url += "&formArray[orNumber]=" + urlEncode(orN);
	url += "&formArray[orDate_year]=" + urlEncode(orDy);
	url += "&formArray[orDate_month]=" + urlEncode(orDm);
	url += "&formArray[orDate_day]=" + urlEncode(orDd);
	url += nameListUrl;

	openWin(url, 'CertificateOfLandHolding', 0, 0, 800, 600);
	return true;
}
</script>

</head>
<body BGCOLOR=#999999 link="#333333" vlink="#333333" alink="#333333" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> 
      <table WIDTH=100 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
        <tr> 
          <td> <img SRC="images/inner_01.jpg" WIDTH=18 HEIGHT=9 ></td>
          <td> <img SRC="images/inner_02.jpg" WIDTH=27 HEIGHT=9 ></td>
          <td COLSPAN=2> <img SRC="images/inner_03.jpg" WIDTH=598 HEIGHT=9 ></td>
          <td COLSPAN=3 ROWSPAN=2><img SRC="images/steps/step00.jpg" WIDTH=157 HEIGHT=133 ></td>
        </tr>
        <tr> 
          <td> <img SRC="images/inner_05.jpg" WIDTH=18 HEIGHT=124 ></td>
          <td> <img SRC="images/inner_06.jpg" WIDTH=27 HEIGHT=124 ></td>
          <td COLSPAN=2 bgcolor="#CCCCCC"> <img SRC="images/title/title_am_reports.jpg" WIDTH=598 HEIGHT=124 ></td>
        </tr>

		<!-- start of navigation menu -->

        <tr> 
          <td> <img SRC="images/inner_08.jpg" WIDTH=18 HEIGHT=53 ></td>
          <td> <img SRC="images/inner_09.jpg" WIDTH=27 HEIGHT=53 ></td>
          <td COLSPAN=3 align="left" valign="top" background="images/nav/nav_b_08_bg.jpg" bgcolor="#CCCCCC"> 
            <table WIDTH=702 BORDER=0 CELLPADDING=0 CELLSPACING=0>
			   <tr> 
			    <td width="72"> <img SRC="images/nav/nav_a_01.jpg" WIDTH=72 HEIGHT=53 ></td>
				<td background="images/nav_area_bg.jpg">
					<table width="100%%" border="0" cellspacing="0" cellpadding="0">
		  <tr align="center"> 
		   <td width="0" align=left class="common"><b>{uname}</b> : {today}</td>
		   <td width="0" align=right>
			<a href="AssessorsHome.php{Session}" class="navi" title="Assessor's Module : Home">AM : Home</a>
		    <font class="navi">&lt;</font>
			<a href="home.php{Session}" class="navi" title="Home">Home</a>		    
		    <font class="navi">|</font>
			<a href="Logout.php" class="navi" title="Logout">Logout</a>
			<br>&nbsp;
		   </td>
		  </tr>

		  <tr align="center"> 
		   <td width="0" nowrap colspan=2 class="navi"><a href="RPUManagementHome.php{Session}" class="navi" title="Real Property Units Management">RPU Management</a>

		   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		   |

		   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		   <!-- BEGIN TransactionsLink -->
           <a href="TransactionsHome.php{Session}" class="navi" title="Transactions">Transactions</a>
		   <!-- END TransactionsLink -->
		   <!-- BEGIN TransactionsLinkText -->
           <font class="navi"><font color="#eeeeee">Transactions</font></font>
		   <!-- END TransactionsLinkText -->

		   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

		   |

		   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		   
		   <a href="ReportsHome.php{Session}" class="navi" title="Reports">Reports</a>
		   
		   </td>

		  </tr>

				 </table>
			    </td>
				<td width="75"> <img SRC="images/nav/nav_a_08.jpg" WIDTH=75 HEIGHT=53 ></td>
		       </tr>
			</table>
          </td>
          <td> <img SRC="images/inner_11.jpg" WIDTH=36 HEIGHT=53 ></td>
          <td> <img SRC="images/inner_12.jpg" WIDTH=17 HEIGHT=53 ></td>
        </tr>

		<!-- end of navigation menu -->

        <tr> 
          <td align="center" valign="top"> <img SRC="images/inner_13.jpg" WIDTH=18 HEIGHT=375 ></td>
          <td background="images/inner_14.jpg"> <img SRC="images/spacer.gif" WIDTH=27 HEIGHT=1 ></td>
          <td COLSPAN=3 align="left" valign="top" background="images/background/bg_middle.jpg" bgcolor="#CCCCCC"> 
            <table width="702" height="375" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td align="left" valign="top"> 
                  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td align="center" valign="top" class="subtitle"> 
                        <table width="90%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            
                          </tr>
                        </table>
                      </td>
                    </tr>

					<tr>
						<td class="navi" align="left">
						 <br>
						 <a href="ReportsHome.php{Session}" class="navi">Assessor's Reports</a> | <a href="OfficialDocuments.php{Session}" class="navi">Official Documents</a>
						</td>					
					</tr>

                    <tr> 
                      <td align="center" valign="top" class="subtitle"><img src="images/spacer.gif" width="10" height="15">

					  <br>CERTIFICATE OF LAND HOLDING

					  <br><br>					  					  
					  
					  </td>
                    </tr>
					<tr>
						<td class="navi" align="left">
							<a href="CertificateOfLandHolding.php{Session}" class="navi">With Properties</a>
							|
							<a href="CertificateOfLandHoldingNoProperties.php{Session}{requestedByURL}" class="navi"><U>Without Properties</U></a>
							<br><br>
						</td>
					</tr>

                    <tr> 
                      <td valign="top" class="fields" align="center">
					  <!-- BEGIN Form -->
					  <form name="CertificateOfLandHolding" action="CertificateOfLandHolding.php{Session}" method="post">
						  <input type="hidden" name="formAction" value="search">
                          <table width="90%" border="0" cellspacing="1" cellpadding="2">
							<tr>
								<td class="fields" bgcolor="#f6f6f6" align=right colspan=2>
								 <B>Requested By:</B>
								</td>
								<td class="fields" bgcolor="#f6f6f6" align=left>
								 <input type="text" name="requestorName" size=50 value="{requestorName}">
								</td>								
							</tr>
							<tr>
								<td class="fields" bgcolor="#f6f6f6" align=right colspan=2>
								 <B>Location:</B>
								</td>
								<td class="fields" bgcolor="#f6f6f6" align=left>
								 <input type="text" name="requestorLocation" size=50 value="{requestorLocation}">
								</td>								
							</tr>
							<tr bgcolor="#f6f6f6">
								<td class="fields" align="right" colspan=2>
									<B>Signatory : </B>
								</td>
								<td class="fields" align="left">
									<select name="signatoryID">
						                <option value="">none</option>
						                <!-- BEGIN SignatoryList -->
							            <option value="{id}" {signatoryID_sel}>{name}</option>
						                <!-- END SignatoryList -->
						              </select>
								</td>
							</tr>
							<tr bgcolor="#f6f6f6">
								<td class="fields" align="right" colspan=2>
									<B>Designation : </B>
								</td>
								<td class="fields" align="left">
									<input type="text" name="designation" size=40 value="{designation}">
								</td>
							</tr>
							
							<tr>
								<td colspan=3>
									&nbsp;
									<br>
								</td>
							</tr>

							<tr bgcolor="#f6f6f6">
								<td class="fields" align="right" colspan=2>
									<B>O.R. Number : </B>
								</td>
								<td class="fields" align="left">
									<input type="text" name="orNumber" size=40 value="{orNumber}">
								</td>
							</tr>
							<tr bgcolor="#f6f6f6">
								<td class="fields" align="right" colspan=2>
									<B>Date of Receipt : </B>
								</td>
								<td class="fields" align="left">
									<table border=0 cellpadding=0>
									<tr>
										<td>
							                <select name="orDate_month" id="orDate_month" onChange="javascript:setDays('orDate')">
							 				   <option value=""></option>
						                       <!-- BEGIN ReceiptDateMonthList -->
						                       <option value = "{monthValue}" {orDate_month_sel}>{month}</option>
						                       <!-- END ReceiptDateMonthList -->
						                    </select>
						                    <select name="orDate_day" id="orDate_day">
										 	   <option value=""></option>
										       <!-- BEGIN ReceiptDateDayList -->
						                       <option value = "{dayValue}" {orDate_day_sel}>{dayValue}</option>
						                       <!-- END ReceiptDateDayList -->
						                    </select>
						                    <select name="orDate_year" id="orDate_year" onChange="javascript:setDays('orDate')">
											   <option value=""></option>
						                       <!-- BEGIN ReceiptDateYearList -->
						                       <option value = "{yearValue}" {orDate_year_sel}>{yearValue}</option>
						                       <!-- END ReceiptDateYearList -->
							                </select>
										</td>
									</tr>
									</table>									
								</td>
							</tr>

							<tr>
								<td colspan=3>
									&nbsp;
									<br>
								</td>
							</tr>

							<tr>
							  <td class="fields" colspan="3" bgcolor="#f6f6f6" align="left">
								Enter name(s) of individual(s), organization(s), and/or corporation(s) to issue this certificate to.
							  </td>
							</tr>

							<tr bgcolor="#f6f6f6">
								<td align="center" width="15%"><input type="button" value="PRINT" style="width:50px; height:20px;" onClick="showPrintWindow();"></td>
								<td colspan=2>&nbsp;</td>
							</tr>

							<tr>
							  <td class="fields" colspan="1" bgcolor="#f6f6f6" align="center"><b>1.</b></td>
							  <td class="fields" colspan="2" bgcolor="#f6f6f6" align="center">
								<textarea name="nameList[]" cols="74" rows=3></textarea>
							  </td>
						    </tr>

							<tr>
							  <td class="fields" colspan="1" bgcolor="#f6f6f6" align="center"><b>2.</b></td>
							  <td class="fields" colspan="2" bgcolor="#f6f6f6" align="center">
								<textarea name="nameList[]" cols="74" rows=3></textarea>
							  </td>
						    </tr>

							<tr>
							  <td class="fields" colspan="1" bgcolor="#f6f6f6" align="center"><b>3.</b></td>
							  <td class="fields" colspan="2" bgcolor="#f6f6f6" align="center">
								<textarea name="nameList[]" cols="74" rows=3></textarea>
							  </td>
						    </tr>

							<tr>
							  <td class="fields" colspan="1" bgcolor="#f6f6f6" align="center"><b>4.</b></td>
							  <td class="fields" colspan="2" bgcolor="#f6f6f6" align="center">
								<textarea name="nameList[]" cols="74" rows=3></textarea>
							  </td>
						    </tr>

							<tr>
							  <td class="fields" colspan="1" bgcolor="#f6f6f6" align="center"><b>5.</b></td>
							  <td class="fields" colspan="2" bgcolor="#f6f6f6" align="center">
								<textarea name="nameList[]" cols="74" rows=3></textarea>
							  </td>
						    </tr>

							<tr>
							  <td class="fields" bgcolor="#f6f6f6" align="center" colspan=3><br>&nbsp;</td>
						    </tr>

						  </table>
					  </form>
					  <!-- END Form -->					  
					  </td>
                    </tr>

                    <tr> 
                      <td align="center" valign="top"><img src="images/spacer.gif" width="10" height="15"><a name="#down"></a></td>
                    </tr>
                    <tr> 
                      <td align="center" valign="top" class="fileds_comment">
					    <br><br><br><br><br><br><br><br><br><br><br><br><br><br>
						Tampering 
                        with this system is criminally punishable under Philippine 
                        Laws.<br>
                        &copy; Republic of the Philippines National Computer Center. 
                        All Rights Reserved. </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
          <td background="images/inner_16.jpg"> <img SRC="images/spacer.gif " WIDTH=36 HEIGHT=375 ></td>
          <td> <img SRC="images/inner_17.jpg" WIDTH=17 HEIGHT=375 ></td>
        </tr>
        <tr> 
          <td> <img SRC="images/inner_18.jpg" WIDTH=18 HEIGHT=39></td>
          <td> <img SRC="images/inner_19.jpg" WIDTH=27 HEIGHT=39></td>
          <td> <img SRC="images/inner_20.jpg" WIDTH=355 HEIGHT=39></td>
          <td> <img SRC="images/inner_21.jpg" WIDTH=243 HEIGHT=39></td>
          <td> <img SRC="images/inner_22.jpg" WIDTH=104 HEIGHT=39></td>
          <td> <img SRC="images/inner_23.jpg" WIDTH=36 HEIGHT=39></td>
          <td> <img SRC="images/inner_24.jpg" WIDTH=17 HEIGHT=39></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>